package com.ctsi.ssdc.domain;

import com.ctsi.ssdc.annotation.AutoId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.time.ZonedDateTime;

/**
 * @author ctsi-biyi-generator
*/
@ApiModel(description = "LitemallStorage")
public class LitemallStorage implements Serializable {
    /**
     * @Fields id 
     */
    @ApiModelProperty("")
    @AutoId(primaryKey = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Integer id;

    /**
     * @Fields key 文件的唯一索引
     */
    @ApiModelProperty("key")
    private String key;

    /**
     * @Fields name 文件名
     */
    @ApiModelProperty("name")
    private String name;

    /**
     * @Fields type 文件类型
     */
    @ApiModelProperty("type")
    private String type;

    /**
     * @Fields size 文件大小
     */
    @ApiModelProperty("size")
    private Integer size;

    /**
     * @Fields url 文件访问链接
     */
    @ApiModelProperty("url")
    private String url;

    /**
     * @Fields addTime 创建时间
     */
    @ApiModelProperty("addTime")
    private ZonedDateTime addTime;

    /**
     * @Fields updateTime 更新时间
     */
    @ApiModelProperty("updateTime")
    private ZonedDateTime updateTime;

    /**
     * @Fields deleted 逻辑删除
     */
    @ApiModelProperty("deleted")
    private Boolean deleted;

    private static final long serialVersionUID = 1L;

    /** 
     * @return id 
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /** 
     * @return key 文件的唯一索引
     */
    public String getKey() {
        return key;
    }

    /**
     * @param key 文件的唯一索引
     */
    public void setKey(String key) {
        this.key = key == null ? null : key.trim();
    }

    /** 
     * @return name 文件名
     */
    public String getName() {
        return name;
    }

    /**
     * @param name 文件名
     */
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    /** 
     * @return type 文件类型
     */
    public String getType() {
        return type;
    }

    /**
     * @param type 文件类型
     */
    public void setType(String type) {
        this.type = type == null ? null : type.trim();
    }

    /** 
     * @return size 文件大小
     */
    public Integer getSize() {
        return size;
    }

    /**
     * @param size 文件大小
     */
    public void setSize(Integer size) {
        this.size = size;
    }

    /** 
     * @return url 文件访问链接
     */
    public String getUrl() {
        return url;
    }

    /**
     * @param url 文件访问链接
     */
    public void setUrl(String url) {
        this.url = url == null ? null : url.trim();
    }

    /** 
     * @return add_time 创建时间
     */
    public ZonedDateTime getAddTime() {
        return addTime;
    }

    /**
     * @param addTime 创建时间
     */
    public void setAddTime(ZonedDateTime addTime) {
        this.addTime = addTime;
    }

    /** 
     * @return update_time 更新时间
     */
    public ZonedDateTime getUpdateTime() {
        return updateTime;
    }

    /**
     * @param updateTime 更新时间
     */
    public void setUpdateTime(ZonedDateTime updateTime) {
        this.updateTime = updateTime;
    }

    /** 
     * @return deleted 逻辑删除
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * @param deleted 逻辑删除
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        LitemallStorage other = (LitemallStorage) that;
        return (this.getId() == null ? other.getId() == null :
				 this.getId().equals(other.getId()))
            && (this.getKey() == null ? other.getKey() == null :
				 this.getKey().equals(other.getKey()))
            && (this.getName() == null ? other.getName() == null :
				 this.getName().equals(other.getName()))
            && (this.getType() == null ? other.getType() == null :
				 this.getType().equals(other.getType()))
            && (this.getSize() == null ? other.getSize() == null :
				 this.getSize().equals(other.getSize()))
            && (this.getUrl() == null ? other.getUrl() == null :
				 this.getUrl().equals(other.getUrl()))
            && (this.getAddTime() == null ? other.getAddTime() == null :
				 this.getAddTime().equals(other.getAddTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null :
				 this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDeleted() == null ? other.getDeleted() == null :
				 this.getDeleted().equals(other.getDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getKey() == null) ? 0 : getKey().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getSize() == null) ? 0 : getSize().hashCode());
        result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode());
        result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        return result;
    }
}